package cn.lin.util;

import java.util.List;

/**
 * @author hx
 * @date 2024/12/3 18:11
 */
public class FileUtil {

    public static List<String> file2Png(String filePath,String ext) throws Exception {

        return switch (ext) {
            case "doc", "docx" -> WordUtil.word2Png(filePath);
            case "pdf" -> PdfUtil.pdf2Png(filePath);
            case "pptx" -> PPTUtil.ppt2Png(filePath);
            default -> null;
        };
    }
}
